import { createApp, VueElement } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './puigins/default-passive-events.js'
import {
	ElMessage,
	ElButton,
	ElAutocomplete,
	ElRadioGroup,
	ElRadio,
	ElPopover,
	ElCarousel,
	ElCarouselItem,
	ElMenu,
	ElMenuItem,
	ElAside,
	ElBacktop,
	ElIcon,
	ElCheckbox,
	ElCheckboxGroup,
	ElMessageBox,
	ElForm,
	ElFormItem,
	ElInput,
	ElImage,
	ElScrollbar,
	ElSkeleton,
	ElSkeletonItem,
	ElDialog,
	ElSelect,
	ElOption,
	ElUpload,
	ElSwitch,
	ElLoading,
	ElDrawer,
	ElTabs,
	ElTabPane,
	ElTag,
	ElButtonGroup,
	ElBreadcrumb,
	ElBreadcrumbItem,
	ElLink,
	ElTable,
	ElTableColumn,
	ElBadge
} from 'element-plus';
import 'element-plus/dist/index.css';

const app=createApp(App)

app.config.globalProperties.$msgError=function(res){
	console.error(res)
	this.$message.error(res.msg)
}

app.use(ElMessage)
app.use(ElButton)
app.use(ElLink)
app.use(ElAutocomplete)
app.use(ElRadioGroup)
app.use(ElRadio)
app.use(ElPopover)
app.use(ElCarousel)
app.use(ElCarouselItem)
app.use(ElMenu)
app.use(ElMenuItem)
app.use(ElAside)
app.use(ElBacktop)
app.use(ElIcon)
app.use(ElCheckbox)
app.use(ElCheckboxGroup)
app.use(ElMessageBox)
app.use(ElForm)
app.use(ElFormItem)
app.use(ElInput)
app.use(ElImage)
app.use(ElScrollbar)
app.use(ElSkeleton)
app.use(ElSkeletonItem)
app.use(ElDialog)
app.use(ElSelect)
app.use(ElOption)
app.use(ElUpload)
app.use(ElSwitch)
app.use(ElLoading)
app.use(ElDrawer)
app.use(ElTabs)
app.use(ElTabPane)
app.use(ElTag)
app.use(ElButtonGroup)
app.use(ElBreadcrumb)
app.use(ElBreadcrumbItem)
app.use(ElTable)
app.use(ElTableColumn)
app.use(ElBadge)


app.use(store).use(router).mount('#app')
//peerjs --port 9898 --key peerjs --path /huat